package com.ai.gesture.controller;

/**
 * ClassName:    GestureRecognitionController
 * Description:  TODO
 * Author:       yuzx
 * Date:         2025/9/9 09:36
 * Version:      1.0
 **/

import com.ai.common.core.domain.AjaxResult;
import com.ai.gesture.domain.dto.GestureRecognitionRequest;
import com.ai.gesture.service.IGestureRecognitionService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 手势识别控制器（若依框架路由规范）
 */
@RestController
@RequestMapping("/gesture/recognition")
public class GestureRecognitionController {

    @Resource
    private IGestureRecognitionService gestureRecognitionService;

    /**
     * 发起手势识别
     * @param request 图片Base64请求
     * @return 识别结果
     */
    @PostMapping("/doRecognize")
    public AjaxResult doRecognize(@Validated @RequestBody GestureRecognitionRequest request) {
        return gestureRecognitionService.recognizeGesture(request);
    }
}
